<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>
<x:parse xml="${param.xmlstr}" var="xmlData"/>

<div class="t_bar">${param.title}</div>
<table class="t_css" width="100%" border="0" cellpadding="0" cellspacing="1" id="fundInfo_from">
    <col style="width: 20%"/>
    <col style="width: 60%"/>
    <col style="width: 20%"/>
    <tr>
        <td align="right"><span class="color_red">*</span>申请省补助（奖励）经费：</td>
        <td colspan="4">
            <input type="text" name="proposal/request_amt"
                   disabled="disabled" id="research_all_subsidy_funds"
                   value="<x:out select="$xmlData/data/proposal/request_amt"/>"
                   class="gray required " onfocus="InitInput.setNumber(this,9,2,2)"
                   style="text-align: right; width: 80%" label="申请省补助（奖励）经费"/>万元
    </tr>
    <tr>
        <td align="right" rowspan="4">其中：</td>
        <td align="right">国内外重点科研院所、高校设立研发机构经费补助：</td>
        <td>
            <input type='text' disabled="disabled" id="research_subsidy_funds" name='proposal/research_subsidy_funds'
                   onchange="countFundAuto('research_','subsidy_funds,support_subsidy_funds,industrialization_award,high_technological','all_subsidy_funds')"
                   onfocus="InitInput.setNumber(this,9,2,2)" style="width: 75%;text-align: right"
                   class="input_css  gray " value='<x:out select="$xmlData/data/proposal/research_subsidy_funds"/>'
                   label="其中-->国内外重点科研院所、高校设立研发机构经费补助">万元
        </td>
    </tr>
    <tr>
        <td align="right">研发机构非财政支持研发经费补助：</td>
        <td>
            <input type='text' name='proposal/research_support_subsidy_funds' disabled="disabled"
                   onfocus="InitInput.setNumber(this,9,2,2)" style="width: 75%;text-align: right"
                   class="input_css  gray" id="research_support_subsidy_funds"
                   value='<x:out select="$xmlData/data/proposal/research_support_subsidy_funds"/>'
                   label="其中-->研发机构非财政支持研发经费补助"
                   onchange="countFundAuto('research_','subsidy_funds,support_subsidy_funds,industrialization_award,high_technological','all_subsidy_funds')">万元
        </td>
    </tr>
    <tr>
        <td align="right">研发机构在皖实施科技成果转化和产业化奖励：</td>
        <td>
            <input type='text' disabled="disabled" id="research_industrialization_award"
                   name='proposal/research_industrialization_award'
                   onchange="countFundAuto('research_','subsidy_funds,support_subsidy_funds,industrialization_award,high_technological','all_subsidy_funds')"
                   onfocus="InitInput.setNumber(this,9,2,2)" style="width: 75%;text-align: right"
                   class="input_css   gray"
                   value='<x:out select="$xmlData/data/proposal/research_industrialization_award"/>'
                   label="其中-->研发机构在皖实施科技成果转化和产业化奖励">万元
        </td>
    </tr>
    <tr>
        <td align="right">高水平学术交流、科技成果交易转化等活动奖励：</td>
        <td>
            <input type='text' disabled="disabled" id="research_high_technological"
                   name='proposal/research_high_technological'
                   onchange="countFundAuto('research_','subsidy_funds,support_subsidy_funds,industrialization_award,high_technological','all_subsidy_funds')"
                   onfocus="InitInput.setNumber(this,9,2,2)" style="width: 75%;text-align: right"
                   class="input_css   gray"
                   value='<x:out select="$xmlData/data/proposal/research_high_technological"/>'
                   label="其中-->高水平学术交流、科技成果交易转化等活动奖励">万元
        </td>
    </tr>
    <tr>
        <td align="left" colspan="3"><strong>落户市2020年对国内外重点科研院所、高校设立研发机构资金支持额度（不含基本建设和固定资产投入补贴）</strong></td>
    </tr>
</table>
<table id="tblorg_szwj" cellpadding="0" class="table01 t_css" width="100%" border="0" cellpadding="0"
       style="*border-bottom: #a1c0dc 1px solid;">
    <thead>
    <tr style="border:1px solid #B7D1E6">
        <th class="TblHead" align="center" width="5%">选择</th>
        <th class="TblHead" align="center" width="5%">序号</th>
        <th class="TblHead" align="center" width="15%">落户市补助文件名称</th>
        <th class="TblHead" align="center" width="15%">文件号</th>
        <th class="TblHead" align="center" width="25%">支持额度（万元)</th>
        <th class="TblHead" align="center" width="35%">文件补助内容简述（不超过100字）</th>
    </tr>
    </thead>
    <tbody id="tab">
    <tr style="display:none">
        <td align="center">
            <input type="radio" style="border: 0px;background-color: white;" class="radiobutton" name="selorg_szwj">
        </td>
        <td align="center">
            <span name="office_szwjs|office_szwj[0]@seq_no">[index]</span>
        </td>
        <td align="center">
            <input id="office_szwj_name_[0]" name="office_szwjs|office_szwj[0]|office_szwj_name" label="落户市补助文件名称"
                   maxlength="50" value="" class=" required input_text" style="width:80%"/>
        </td>
        <td align="center">
            <input id="office_szwj_number_[0]" name="office_szwjs|office_szwj[0]|office_szwj_number" label="文件号"
                   maxlength="50" value="" class="required input_text" style="width:80%"/>
        </td>
        <td align="center">
            <input id="office_szwj_quota_[0]" name="office_szwjs|office_szwj[0]|office_szwj_quota" label="支持额度"
                   onchange="countFundAuto1('tblorg_szwj','office_szwj_quota','research_subsidy_funds');countFundAuto('research_','subsidy_funds,support_subsidy_funds,industrialization_award,high_technological','all_subsidy_funds')"
                   onfocus="InitInput.setNumber(this,9,2,2)" value="" class=" required input_text"
                   style="width:75%;text-align: right"/>
        </td>
        <td align="center">
            <input id="office_szwj_sketch_[0]" name="office_szwjs|office_szwj[0]|office_szwj_sketch" label="文件补助内容简述"
                   value="" maxlength="100" class=" required input_text" style="width:80%"/>
        </td>
    </tr>
    <c:set value="0" var="index" scope="page"/>
    <x:forEach select="$xmlData/data/office_szwjs/office_szwj" var="office_szwj">

        <c:choose>
            <c:when test="${index<10}"><c:set value="0" var="flag" scope="page"/></c:when>
            <c:otherwise><c:set value="" var="flag" scope="page"/></c:otherwise>
        </c:choose>
        <tr>
            <td align="center">
                <input type="radio" style="border: 0px;background-color: white;" class="radiobutton" name="selorg_szwj">
            </td>
            <td align="center">
                <span name="office_szwjs/office_szwj[${flag}${index}]@seq_no"><x:out
                        select="$office_szwj/@seq_no"/></span>
            </td>
            <td align="center">
                <input id="office_szwj_name_[${flag}${index}]"
                       name="office_szwjs/office_szwj[${flag}${index}]/office_szwj_name" label="落户市补助文件名称"
                       maxlength="50" value="<x:out select="$office_szwj/office_szwj_name"/>"
                       class=" required input_text" style="width:80%"/>
            </td>
            <td align="center">
                <input id="office_szwj_number_[${flag}${index}]"
                       name="office_szwjs/office_szwj[${flag}${index}]/office_szwj_number" label="文件号" maxlength="50"
                       value="<x:out select="$office_szwj/office_szwj_number"/>" class=" required input_text"
                       style="width:80%"/>
            </td>
            <td align="center">
                <input id="office_szwj_quota_[${flag}${index}]"
                       name="office_szwjs/office_szwj[${flag}${index}]/office_szwj_quota"
                       onchange="countFundAuto1('tblorg_szwj','office_szwj_quota','research_subsidy_funds');countFundAuto('research_','subsidy_funds,support_subsidy_funds,industrialization_award,high_technological','all_subsidy_funds')"
                       label="支持额度" onfocus="InitInput.setNumber(this,9,2,2)"
                       value="<x:out select="$office_szwj/office_szwj_quota"/>" class=" required input_text"
                       style="width:75%;text-align: right"/>
            </td>
            <td align="center">
                <input id="office_szwj_sketch_[${flag}${index}]"
                       name="office_szwjs/office_szwj[${flag}${index}]/office_szwj_sketch" label="文件补助内容简述"
                       value="<x:out select="$office_szwj/office_szwj_sketch"/>" maxlength="100"
                       class=" required input_text" style="width:80%"/>
            </td>
        </tr>
        <c:set value="${index+1}" var="index" scope="page"/>
    </x:forEach>
    </tbody>
</table>

<table id="jbutton" width="98%" align="center" border="0" cellspacing="0" cellpadding="0" style="border:0;">
    <tr>
        <td>
            <input class="button_02" id="tianjia" name="cmdAddbefore" type=button value="添加"
                   onclick="if(checkTabLimit('tblorg_szwj',3,'落户市2020年对国内外重点科研院所、高校设立研发机构资金支持额度信息最多只能填写3条')){addNewRow('tblorg_szwj');showDateTag('tblorg_szwj');}try{top.resizeFrame();}catch(e){};changeCss();countFundAuto1('tblorg_szwj','office_szwj_quota','research_subsidy_funds');countFundAuto('research_','subsidy_funds,support_subsidy_funds,industrialization_award,high_technological','all_subsidy_funds')">
            <input class="button_02" name="cmdMovePrev" type=button value="上移"
                   onclick="movePrev('tblorg_szwj','selorg_szwj');changeCss();">
            <input class="button_02" name="cmdMoveNext" type=button value="下移"
                   onclick="moveNext('tblorg_szwj','selorg_szwj');changeCss();">
            <input class="button_02" name="cmddel" type=button value="删除"
                   onclick="deleteSelectedRow('tblorg_szwj','落户市2020年对国内外重点科研院所、高校设立研发机构资金支持额度信息');changeCss();countFundAuto1('tblorg_szwj','office_szwj_quota','research_subsidy_funds');countFundAuto('research_','subsidy_funds,support_subsidy_funds,industrialization_award,high_technological','all_subsidy_funds')">
        </td>
    </tr>
</table>

<table cellpadding="0" class="table01 t_css" width="100%" border="0" cellpadding="0" id="tblorg_tbzz"
       style="*border-bottom: #a1c0dc 1px solid;">
    <col style="width:5%"/>
    <col style="width:5%"/>
    <col style="width:15%"/>
    <col style="width:15%"/>
    <col style="width:25%"/>
    <col style="width:35%"/>
    <tr class="li_1">
        <td align="left" colspan="5"><strong>研发机构2020年非财政经费支持的研发经费支出额度同比增量</strong></td>
        <td align="center">
            <input type='text' id="quota_increment" name='proposal/quota_increment'
                   onchange="countFundAuto1('tblorg_tbzz','quota_increment','research_support_subsidy_funds');countFundAuto('research_','subsidy_funds,support_subsidy_funds,industrialization_award,high_technological','all_subsidy_funds')"
                   onfocus="InitInput.setNumber(this,9,2,2)" style="width: 73%;text-align: right" class="input_css  "
                   value='<x:out select="$xmlData/data/proposal/quota_increment"/>'
                   label="研发机构2018年非财政经费支持的研发经费支出额度同比增量">万元
        </td>
    </tr>
    <tr class="li_1">
        <td align="left" colspan="6"><strong>落户市2020年对研发机构在皖开展科技成果转化和产业化奖励资金</strong></td>
    </tr>
</table>

<table id="tblorg_zwzj" cellpadding="0" class="table01 t_css" width="100%" border="0" cellpadding="0"
       style="*border-bottom: #a1c0dc 1px solid;">
    <thead>
    <tr style="border:1px solid #B7D1E6">
        <th class="TblHead" align="center" width="5%">选择</th>
        <th class="TblHead" align="center" width="5%">序号</th>
        <th class="TblHead" align="center" width="15%">落户市奖励文件名称</th>
        <th class="TblHead" align="center" width="15%">文件号</th>
        <th class="TblHead" align="center" width="25%">奖励资金（万元）</th>
        <th class="TblHead" align="center" width="35%">文件奖励内容简述（不超过100字）</th>
    </tr>
    </thead>
    <tbody id="tab1">
    <tr style="display:none">
        <td align="center">
            <input type="radio" style="border: 0px;background-color: white;" class="radiobutton" name="selorg_zwzj">
        </td>
        <td align="center">
            <span name="office_zwzjs|office_zwzj[0]@seq_no">[index]</span>
        </td>
        <td align="center">
            <input id="office_zwzj_name_[0]" name="office_zwzjs|office_zwzj[0]|office_zwzj_name" label="落户市奖励文件名称"
                   maxlength="50" value="" class=" required input_text" style="width:80%"/>
        </td>
        <td align="center">
            <input id="office_zwzj_number_[0]" name="office_zwzjs|office_zwzj[0]|office_zwzj_number" label="文件号"
                   maxlength="50" value="" class=" required input_text" style="width:80%"/>
        </td>
        <td align="center">
            <input id="office_zwzj_quota_[0]" name="office_zwzjs|office_zwzj[0]|office_zwzj_quota"
                   onchange="countFundAuto1('tblorg_zwzj','office_zwzj_quota','research_industrialization_award');countFundAuto('research_','subsidy_funds,support_subsidy_funds,industrialization_award,high_technological','all_subsidy_funds')"
                   onfocus="InitInput.setNumber(this,9,2,2)" label="奖励资金" maxlength="9" value=""
                   class=" required input_text" style="width:75%;text-align: right"/>
        </td>
        <td align="center">
            <input id="office_zwzj_sketch_[0]" name="office_zwzjs|office_zwzj[0]|office_zwzj_sketch" label="文件奖励内容简述"
                   value="" maxlength="100" class=" required input_text" style="width:80%"/>
        </td>
    </tr>

    <c:set value="0" var="index" scope="page"/>
    <x:forEach select="$xmlData/data/office_zwzjs/office_zwzj" var="office_zwzj">

        <c:choose>
            <c:when test="${index<10}"><c:set value="0" var="flag" scope="page"/></c:when>
            <c:otherwise><c:set value="" var="flag" scope="page"/></c:otherwise>
        </c:choose>
        <tr>
            <td align="center">
                <input type="radio" style="border: 0px;background-color: white;" class="radiobutton" name="selorg_zwzj">
            </td>
            <td align="center">
                <span name="office_zwzjs/office_zwzj[${flag}${index}]@seq_no"><x:out
                        select="$office_zwzj/@seq_no"/></span>
            </td>
            <td align="center">
                <input id="office_zwzj_name_[${flag}${index}]"
                       name="office_zwzjs/office_zwzj[${flag}${index}]/office_zwzj_name" label="落户市奖励文件名称"
                       maxlength="50" value="<x:out select="$office_zwzj/office_zwzj_name"/>"
                       class=" required input_text" style="width:80%"/>
            </td>
            <td align="center">
                <input id="office_zwzj_number_[${flag}${index}]"
                       name="office_zwzjs/office_zwzj[${flag}${index}]/office_zwzj_number" label="文件号" maxlength="50"
                       value="<x:out select="$office_zwzj/office_zwzj_number"/>" class=" required input_text"
                       style="width:80%"/>
            </td>
            <td align="center">
                <input id="office_zwzj_quota_[${flag}${index}]"
                       onchange="countFundAuto1('tblorg_zwzj','office_zwzj_quota','research_industrialization_award');countFundAuto('research_','subsidy_funds,support_subsidy_funds,industrialization_award,high_technological','all_subsidy_funds')"
                       onfocus="InitInput.setNumber(this,9,2,2)"
                       name="office_zwzjs/office_zwzj[${flag}${index}]/office_zwzj_quota" label="奖励资金" maxlength="50"
                       value="<x:out select="$office_zwzj/office_zwzj_quota"/>" class=" required input_text"
                       style="width:75%;text-align: right"/>
            </td>
            <td align="center">
                <input id="office_zwzj_sketch_[${flag}${index}]"
                       name="office_zwzjs/office_zwzj[${flag}${index}]/office_zwzj_sketch" label="文件奖励内容简述"
                       value="<x:out select="$office_zwzj/office_zwzj_sketch"/>" maxlength="100"
                       class=" required input_text" style="width:80%"/>
            </td>
        </tr>
        <c:set value="${index+1}" var="index" scope="page"/>
    </x:forEach>
    </tbody>
</table>

<table id="jbutton" width="98%" align="center" border="0" cellspacing="0" cellpadding="0" style="border:0;">
    <tr>
        <td>
            <input class="button_02" id="tianjia" name="cmdAddbefore" type=button value="添加"
                   onclick="if(checkTabLimit('tblorg_zwzj',3,'落户市2020年对研发机构在皖开展科技成果转化和产业化奖励资金信息最多只能填写3条')){addNewRow('tblorg_zwzj');showDateTag('tblorg_zwzj');}try{top.resizeFrame();}catch(e){};changeCss();countFundAuto1('tblorg_zwzj','office_zwzj_quota','research_industrialization_award');countFundAuto('research_','subsidy_funds,support_subsidy_funds,industrialization_award,high_technological','all_subsidy_funds')">
            <input class="button_02" name="cmdMovePrev" type=button value="上移"
                   onclick="movePrev('tblorg_zwzj','selorg_zwzj');changeCss();">
            <input class="button_02" name="cmdMoveNext" type=button value="下移"
                   onclick="moveNext('tblorg_zwzj','selorg_zwzj');changeCss();">
            <input class="button_02" name="cmddel" type=button value="删除"
                   onclick="deleteSelectedRow('tblorg_zwzj','落户市2020年对研发机构在皖开展科技成果转化和产业化奖励资金信息');changeCss();countFundAuto1('tblorg_zwzj','office_zwzj_quota','research_industrialization_award');countFundAuto('research_','subsidy_funds,support_subsidy_funds,industrialization_award,high_technological','all_subsidy_funds')">
        </td>
    </tr>
</table>
<table width="98%" align="center" border="0" cellspacing="0" cellpadding="0" style="border:0;">
    <tr>
        <td align="left" colspan="6"><strong>落户市2020年对发起、组织高水平学术交流、科技成果交易转化等活动支持资金</strong></td>
    </tr>
</table>
<table id="tblorg_gspkjcg" cellpadding="0" class="table01 t_css" width="100%" border="0" cellpadding="0"
       style="*border-bottom: #a1c0dc 1px solid;">
    <thead>
    <tr style="border:1px solid #B7D1E6">
        <th class="TblHead" align="center" width="5%">选择</th>
        <th class="TblHead" align="center" width="5%">序号</th>
        <th class="TblHead" align="center" width="15%">落户市支持文件名称</th>
        <th class="TblHead" align="center" width="15%">文件号</th>
        <th class="TblHead" align="center" width="25%">支持资金（万元）</th>
        <th class="TblHead" align="center" width="35%">文件支持内容简述（不超过100字）</th>
    </tr>
    </thead>
    <tbody id="tab2">
    <tr style="display:none">
        <td align="center">
            <input type="radio" style="border: 0px;background-color: white;" class="radiobutton" name="selorg_gspkjcg">
        </td>
        <td align="center">
            <span name="office_gspkjcgs|office_gspkjcg[0]@seq_no">[index]</span>
        </td>

        <td align="center">
            <input id="office_gspkjcg_name_[0]" name="office_gspkjcgs|office_gspkjcg[0]|office_gspkjcg_name" label="落户市支持文件名称"
                   maxlength="50" value="" class=" required input_text" style="width:80%"/>
        </td>
        <td align="center">
            <input id="office_gspkjcg_number_[0]" name="office_gspkjcgs|office_gspkjcg[0]|office_gspkjcg_number" label="文件号"
                   maxlength="50" value="" class=" required input_text" style="width:80%"/>
        </td>
        <td align="center">
            <input id="office_gspkjcg_quota_[0]" name="office_gspkjcgs|office_gspkjcg[0]|office_gspkjcg_quota"
                   onchange="countFundAuto1('tblorg_gspkjcg','office_gspkjcg_quota','research_high_technological');countFundAuto('research_','subsidy_funds,support_subsidy_funds,industrialization_award,high_technological','all_subsidy_funds')"
                   onfocus="InitInput.setNumber(this,9,2,2)" label="支持资金" maxlength="9" value=""
                   class=" required input_text" style="width:75%;text-align: right"/>
        </td>
        <td align="center">
            <input id="office_gspkjcg_sketch_[0]" name="office_gspkjcgs|office_gspkjcg[0]|office_gspkjcg_sketch" label="文件支持内容简述"
                   value="" maxlength="100" class=" required input_text" style="width:80%"/>
        </td>
    </tr>

    <c:set value="0" var="index" scope="page"/>
    <x:forEach select="$xmlData/data/office_gspkjcgs/office_gspkjcg" var="office_gspkjcg">

        <c:choose>
            <c:when test="${index<10}"><c:set value="0" var="flag" scope="page"/></c:when>
            <c:otherwise><c:set value="" var="flag" scope="page"/></c:otherwise>
        </c:choose>
        <tr>
            <td align="center">
                <input type="radio" style="border: 0px;background-color: white;" class="radiobutton" name="selorg_gspkjcg">
            </td>
            <td align="center">
                <span name="office_gspkjcgs/office_gspkjcg[${flag}${index}]@seq_no"><x:out
                        select="$office_gspkjcg/@seq_no"/></span>
            </td>
            <td align="center">
                <input id="office_gspkjcg_name_[${flag}${index}]"
                       name="office_gspkjcgs/office_gspkjcg[${flag}${index}]/office_gspkjcg_name" label="落户市支持文件名称"
                       maxlength="50" value="<x:out select="$office_gspkjcg/office_gspkjcg_name"/>"
                       class=" required input_text" style="width:80%"/>
            </td>
            <td align="center">
                <input id="office_gspkjcg_number_[${flag}${index}]"
                       name="office_gspkjcgs/office_gspkjcg[${flag}${index}]/office_gspkjcg_number" label="文件号" maxlength="50"
                       value="<x:out select="$office_gspkjcg/office_gspkjcg_number"/>" class=" required input_text"
                       style="width:80%"/>
            </td>
            <td align="center">
                <input id="office_gspkjcg_quota_[${flag}${index}]"
                       onchange="countFundAuto1('tblorg_gspkjcg','office_gspkjcg_quota','research_high_technological');countFundAuto('research_','subsidy_funds,support_subsidy_funds,industrialization_award,high_technological','all_subsidy_funds')"
                       onfocus="InitInput.setNumber(this,9,2,2)"
                       name="office_gspkjcgs/office_gspkjcg[${flag}${index}]/office_gspkjcg_quota" label="支持资金" maxlength="50"
                       value="<x:out select="$office_gspkjcg/office_gspkjcg_quota"/>" class=" required input_text"
                       style="width:75%;text-align: right"/>
            </td>
            <td align="center">
                <input id="office_gspkjcg_sketch_[${flag}${index}]"
                       name="office_gspkjcgs/office_gspkjcg[${flag}${index}]/office_gspkjcg_sketch" label="文件支持内容简述"
                       value="<x:out select="$office_gspkjcg/office_gspkjcg_sketch"/>" maxlength="100"
                       class=" required input_text" style="width:80%"/>
            </td>
        </tr>
        <c:set value="${index+1}" var="index" scope="page"/>
    </x:forEach>
    </tbody>
</table>

<table id="jbutton" width="98%" align="center" border="0" cellspacing="0" cellpadding="0" style="border:0;">
    <tr>
        <td>
            <input class="button_02" id="tianjia" name="cmdAddbefore" type=button value="添加"
                   onclick="if(checkTabLimit('tblorg_gspkjcg',3,'落户市2020年对发起、组织高水平学术交流、科技成果交易转化等活动支持资金信息最多只能填写3条')){addNewRow('tblorg_gspkjcg');showDateTag('tblorg_gspkjcg');}try{top.resizeFrame();}catch(e){};changeCss();countFundAuto1('tblorg_gspkjcg','office_gspkjcg_quota','research_high_technological');countFundAuto('research_','subsidy_funds,support_subsidy_funds,industrialization_award,high_technological','all_subsidy_funds')">
            <input class="button_02" name="cmdMovePrev" type=button value="上移"
                   onclick="movePrev('tblorg_gspkjcg','selorg_gspkjcg');changeCss();">
            <input class="button_02" name="cmdMoveNext" type=button value="下移"
                   onclick="moveNext('tblorg_gspkjcg','selorg_gspkjcg');changeCss();">
            <input class="button_02" name="cmddel" type=button value="删除"
                   onclick="deleteSelectedRow('tblorg_gspkjcg','落户市2020年对发起、组织高水平学术交流、科技成果交易转化等活动支持资金信息');changeCss();countFundAuto1('tblorg_gspkjcg','office_gspkjcg_quota','research_high_technological');countFundAuto('research_','subsidy_funds,support_subsidy_funds,industrialization_award,high_technological','all_subsidy_funds')">
        </td>
    </tr>
</table>

<script type="text/javascript">
    $(function () {
        changeCss();
        fileInit_1("tblMileStones1", "PDF", null, "{'PDF':'20480'}");
        $("#tblMileStones1").find(".file").hide();
    });

    function changeCss() {
        $("table.t_css").each(function () {
            $(this).find("tr:even").removeClass().addClass("li_1");
            $(this).find("tr:odd").removeClass().addClass("li_2");
        });
        changeCss1("fundInfo", "tblMileStones1");
    }

    function changeCss1(id1, id2) {
        if ($("#" + id1 + " tr:last").attr("class") == "li_1") {
            $("#" + id2 + " tr").removeClass("li_1").addClass("li_2");
        } else {
            $("#" + id2 + " tr").removeClass("li_2").addClass("li_1");
        }
    }

    function uploadfile(index, i) {
        if (2 == index) {
            $("#proof_file_data").click();

        } else
            $("#card_file").click();
    }

    /* function show(index){
        $("#kepu").find("#proof_file"+index).show();
    } */
    function fileInit_1(tableId, type, width, validateJson) {
        var imgres = "";

        if (locale == "en_US") {
            imgres = "Upload_EN.gif";

        } else {
            imgres = "Upload_2.gif";

        }
        $("#" + tableId).find(":file").filestyle({
            image: res + "/images/" + imgres,
            imageheight: 25,
            imagewidth: 56,
            width: width
        });
        $("#" + tableId).find(":file").not("#filedata\\[0\\]").each(
            function (i) {
                $(this).change(
                    function () {
                        var str = $(this).attr("id");
                        var index = str.charAt(str.length - 1);
                        showFileName_1($(this), tableId, type,
                            validateJson, index);
                    });
            });
    }

    function showFileName_1(obj, tableId, type, validateJson, index) {
        var max = null;
        var fileTblId = null;// 文件列表的表格id

        fileTblId = tableId;
        var filedata = obj.val();
        if (filedata == '')
            return;
        else if (max != null && $.isNumeric(max) && fileTblId != null
            && $("#" + fileTblId + " tr:gt(1)").length >= max) {
            var label = "";
            if ($("#" + fileTblId).attr("label") != null)
                label = $("#" + fileTblId).attr("label");

            scmWarn(label + messageTip.canNotUploadMoreThan + max
                + messageTip.files1);
            return;
        } else {
            var fileName = filedata.substring(filedata.replace(/\\/g, '/')
                .lastIndexOf('/') + 1);
            var end = fileName.substring(fileName.lastIndexOf(".") + 1,
                fileName.length).toUpperCase();
            if (type.indexOf(end) < 0) {
                scmWarn(messageTip.pleaseUpload + type + messageTip.files2,
                    "100px");
                return;
            }
        }

        $("#" + tableId + " .file").val(fileName);
        ajaxFileUpload_1(obj, "orgattach", tableId, type, max, validateJson,
            index);
    }

    function ajaxFileUpload_1(obj, type, tblId, filetype, max, validateJson,
                              index) {
        irisAjaxFileUpload_1(obj, type, tblId, filetype, max, validateJson,
            index);
    }

    function uploadSuccess_1(obj, data, tableId, filetype, index) {
        $("#" + tableId).find("#file_code" + index).val(
            data[data.length - 1].fileCode);
        $("#" + tableId).find("#file_name" + index).text(
            data[data.length - 1].fileName);
        $("#" + tableId).find("#file_url" + index).attr("href",
            downloadPath + data[data.length - 1].fileCode);
        $("#proof_file" + index).show();
        $("#sy_delConent" + index).show();

        /*              var fileDate = $("#" + tableId).find("span[id='file_date'"+index+"]");// 上传时间对象
         */
        var fileDate = $("#" + tableId).find("#file_date" + index);// 上传时间对象
        var nowTime = showLocale(new Date());
        fileDate.text(nowTime);
        $("#" + tableId).find("#" + index).show();
    }

    function irisAjaxFileUpload_1(obj, type, tableId, fileType, max,
                                  validateJson, index) {
        if (type == null || type == '') {
            scmWarn(messageTip.pleaseEnterTypeOfAttachment);
            return;
        }
        $("#" + tableId + " input[type='file']").not(obj).each(function () {
            this.outerHTML = this.outerHTML.replace(/(value=\").+\"/i, "$1\"");
        });

        prcWin.openWin();// 打开遮罩层
        $
            .ajaxFileUpload({
                url: ctx + '/file/ajax-fileupload',// 请求地址
                secureuri: false,// 一般设置为false
                fileElementId: 'filedata',// 文件的id属性
                limitSize: '10',// 允许上传的文件大小,单位M
                allowType: '',// 允许上传的文件类型.
                data: {
                    'type': type,
                    'validateJson': validateJson
                },
                tableId: tableId,// tableID
                dataType: 'json',// 返回值类型
                success: function (data, status) // 服务器成功响应处理函数
                {
                    if (data.result == 'error') {
                        scmWarn(data.msg);
                    } else {

                        uploadSuccess_1(obj, data, tableId, fileType, index);

                        $("#" + tableId)
                            .find(":file")
                            .not("#filedata\\[0\\]")
                            .each(
                                function (i) {
                                    fileType = "JPG，PNG，DOC，WPS，DOCX，PDF，XLS，XLSX，TIFF，RAR";
                                    validateJson = "{'JPG':'20480','PNG':'20480','DOC':'20480','WPS':'20480','DOCX':'20480','PDF':'20480','XLS':'20480','XLSX':'20480','TIFF':'20480','RAR':'20480'}";
                                    $(this).unbind("change");
                                    $(this)
                                        .change(
                                            function () {
                                                var str = $(
                                                    this)
                                                    .attr(
                                                        "id");
                                                var index = str
                                                    .charAt(str.length - 1);
                                                showFileName_1(
                                                    $(this),
                                                    tableId,
                                                    fileType,
                                                    validateJson,
                                                    index);
                                            });
                                });
                    }
                    prcWin.closeWin();// 关闭遮罩层
                },
                error: function (data, status, e)// 服务器响应失败处理函数
                {
                    $("#" + tableId + " input[type='file']").each(
                        function (j) {
                            this.outerHTML = this.outerHTML.replace(
                                /(value=\").+\"/i, "$1\"");
                        });

                    $("#" + tableId)
                        .find(":file")
                        .not("#filedata\\[0\\]")
                        .each(
                            function (i) {
                                fileType = "JPG，PNG，DOC，WPS，DOCX，PDF，XLS，XLSX，TIFF，RAR";
                                validateJson = "{'JPG':'20480','PNG':'20480','DOC':'20480','WPS':'20480','DOCX':'20480','PDF':'20480','XLS':'20480','XLSX':'20480','TIFF':'20480','RAR':'20480'}";
                                $(this).unbind("change");
                                $(this)
                                    .change(
                                        function () {
                                            showFileName_1(
                                                $(this),
                                                "mainGoodsInfo",
                                                fileType,
                                                validateJson,
                                                index);
                                        });
                            });
                    if (data && data.responseText && data.responseText.indexOf('413') > -1) {
				scmError("上传的文件超过限制大小！");
			} else {
				scmError(status);
			}
                    prcWin.closeWin();// 关闭遮罩层
                },
                complete: function () {
                    prcWin.closeWin();// 关闭遮罩层
                }
            });

    }

    function countFundAuto(idStart, countStr, totalStr) {
        var indexs = countStr.split(",");
        var count = 0;
        for (var i = 0; i < indexs.length; i++) {
            //
            //var fund=$("input[id='idStart+indexs[i]']").val();
            var fund = $("#" + idStart + indexs[i]).val();
            if (!$.isNumeric(fund))
                fund = "0";
            count = ((parseFloat(count) * 10000 + parseFloat(fund) * 10000) / 10000).toFixed(2);

        }
        count = formatNumberAuto(count.toString(), 9, 2, 2);// 格式化金额

        //add by cg 扩展：对于多个输入框所求得的和，同时赋给某几个文本框
        var totalStrArr = totalStr.split(",");
        var totalId;
        for (var i = 0; i < totalStrArr.length; i++) {
            totalId = totalStrArr[i];

            $("#" + idStart + totalId).val(count);
        }
    }

    function delContent_1(tableId, index) {
        if (confirm("你确定要删除该附件？")) {
            /* $("#" + tableId).find("input[id='file_code']").val("");// 清空文件名
            $("#" + tableId).find("span[id='file_date']").text("");// 清空文件code
            $("#" + tableId).find("span[id='file_name']").text("");// 清空文件上传日期
            $("#"+tableId).find("#proof_content").hide(); */

            $("#" + tableId).find("#file_code" + index).val("");// 清空文件名
            $("#" + tableId).find("#file_date" + index).text("");// 清空文件code
            $("#" + tableId).find("#file_name" + index).text("");// 清空文件上传日期
            $("#" + tableId).find("#proof_content" + index).hide();

            $("#sy_delConent" + index).hide();
            $("#file" + index).val("");
            $("#proof_file" + index).hide();

            /* $("#" + tableId).find("#proof_file"+index).hide(); */

        }
    }

    function countFundAuto1(tabid, endName, targetId) {
        if (targetId == "research_subsidy_funds") {
            var num = 0.00;
            $("#" + tabid).find("tr td input[name$=" + endName + " ]").each(
                function () {
                    if ($(this).val() == '' || $(this).val() == undefined || isNaN($(this).val())) {
                        return;
                    }
                    num = num + parseFloat($(this).val())* 10000;
                });
            num = formatNumberAuto((num/ 100000).toFixed(2).toString(), 9, 2, 2);
            if (num > 10000) {
                $("#" + targetId).val('10000.00');
            } else {
                $("#" + targetId).val(num);
            }
        }else if (targetId == "research_support_subsidy_funds") {
            var num = 0.00;
            var quota_increment = $('#quota_increment').val();
            if (quota_increment == ''){
                quota_increment = 0.00;
            }else if (quota_increment == undefined || isNaN(quota_increment)) {
                return;
            }
            num = num + parseFloat(quota_increment) * 10000;

            num = formatNumberAuto((num / 100000).toFixed(2).toString(), 9, 2, 2);
            if (num > 1000) {
                $("#" + targetId).val('1000.00');
            } else {
                $("#" + targetId).val(num);
            }
        }else if (targetId == "research_industrialization_award") {
            var num = 0.00;
            $("#" + tabid).find("tr td input[name$=" + endName + " ]").each(
                function () {
                    if ($(this).val() == '' || $(this).val() == undefined || isNaN($(this).val())) {
                        return;
                    }
                    num = num + parseFloat($(this).val())* 10000;
                });
            num = formatNumberAuto((num/ 100000).toFixed(2).toString(), 9, 2, 2);
            if (num > 500) {
                $("#" + targetId).val('500.00');
            } else {
                $("#" + targetId).val(num);
            }
        }else if (targetId == "research_high_technological") {
            var num = 0.00;
            $("#" + tabid).find("tr td input[name$=" + endName + " ]").each(
                function () {
                    if ($(this).val() == '' || $(this).val() == undefined || isNaN($(this).val())) {
                        return;
                    }
                    num = num + parseFloat($(this).val())* 10000;
                });
            num = formatNumberAuto((num/ 50000).toFixed(2).toString(), 9, 2, 2);
            if (num > 200) {
                $("#" + targetId).val('200.00');
            } else {
                $("#" + targetId).val(num);
            }
        }
    }

    function countCols(id, colNameSuffix, countId) {
        var tableObj = document.getElementById(id);
        var trObj;
        var total = 0;
        var colValue;
        for (var i = tableObj.rows.length - 1; i > 1; i--) {
            trObj = tableObj.rows[i];
            colValue = $(trObj).find("span[name$='office_szwj_quota']").text();
            if (!!colValue) {
                total += parseInt(colValue);
            }
        }
        $("#" + countId).val(total);
    }
</script>